<template>
  <van-row class="card-grade-resume">
    <van-row class="grade-resume-title">{{resume.department_path.substring(resume.department_path.indexOf('/') + 1) }}</van-row>
    <van-row class="grade-resume-content">
      <van-cell title="待审核" :value="resume.problem_num"/>
      <van-cell title="扣分总计" :value="Math.round(resume.score * 100) / 100"/>
      <panel-approve-resume v-if="assessType === $vo.AssessType.CORP + ''" :resumes="resume.subDeptStat"/>
    </van-row>
    <van-row class="split"/>
    <van-row class="grade-resume-foot">
      <van-col span="8">
        <van-button block type="info" size="small" @click="$emit('onClick', resume, 'show')">查看详情</van-button>
      </van-col>
      <van-col span="8">
        <van-button :disabled="resume.problem_num === 0" block type="primary" size="small" @click="$emit('onClick', resume, 'agree')">全部同意</van-button>
      </van-col>
      <van-col span="8">
        <van-button :disabled="resume.problem_num === 0" block type="warning" size="small" @click="$emit('onClick', resume, 'refuse')">退回重评</van-button>
      </van-col>
    </van-row>
  </van-row>
</template>


<script>
import PanelApproveResume from '@/views/common/panel/PanelApproveResume'
export default {
  name: 'CardGradeResume',
  components: { PanelApproveResume },
  props: ['resume', 'assessType']
}
</script>

<style scoped lang="less">
  .card-grade-resume {
    padding: 10px 16px;
    .grade-resume-title {
      background-color: rgba(100, 100, 100, 0.2);
      color: #323233;
      border-radius: 10px 10px 0 0;
      text-align: center;
      font-size: 16px;
      font-weight: bold;
      line-height: 35px;
    }
    .grade-resume-content {
      background-color: white;
      line-height: 20px;
      .van-cell {
        padding-top: 2px;
        padding-bottom: 2px;
      }
    }
    .grade-resume-foot {
      background-color: white;
      .van-col{
        padding: 10px 10px;
      }
    }
    .split{
      border-bottom: 1px solid #ebedf0;
      height: 0;
      transform: scaleY(0.5);
    }
  }
</style>
